﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CatUtils.Utils.SpecialUtils.ContentRecognition.BaiduUtils.ImageRecognition;

namespace Image_Porn_Identification.UserView
{
    public partial class Setting : UserControl
    {
        public Setting()
        {
            InitializeComponent();
            textBox1.Text = BaiduHelper.MaxCount.ToString();
        }

        private void BtSaveInfo_Click(object sender, EventArgs e)
        {
            BaiduHelper.SaveInfo(TbApiKey.Text, TbSecretKey.Text);
            TbApiKey.Text = "";
            TbSecretKey.Text = "";
            MessageBox.Show("已保存！");
        }

        private void button1_Click(object sender, EventArgs e)
        {
            BaiduHelper.SaveCount(textBox1.Text);
            textBox1.Text = BaiduHelper.MaxCount.ToString();
        }
    }
}